#!/usr/bin/env python3
# -*- coding:utf-8 -*-
import json
import datetime
import time
import logging
import sys
import os

from sanic import Sanic, response
import uvloop
import asyncio
import config
import etl
# pip3 install Sanic


app = Sanic(__name__)
app.add_route(config.getmenu,'/getmenu', methods=['GET'])
app.add_route(config.login,'/login', methods=['POST'])
# app.add_route(appsmith.chk_token,'/chk_token', methods=['POST'])
# app.add_route(appsmith.setlog,'/setlog', methods=['POST'])
app.add_route(etl.upload_excel,'/upload_excel', methods=['POST'])
app.add_route(etl.upload_get_excel_head,'/upload_get_excel_head', methods=['POST'])
app.add_route(etl.insert_books,'/insert_books', methods=['POST'])

if __name__ == '__main__':
  asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
  app.run(host="0.0.0.0", port=8080)
      


  

  
  
